package com.hhkj.admin.sale.model.dopo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.hhkj.admin.sale.common.cont.SaleWithdrawalConst;
import com.hhkj.admin.sale.domain.SaleWithdrawal;
import lombok.Data;

@Data
public class SaleWithdrawalPo extends SaleWithdrawal {

    /** 商家名称和编号 **/
    @Excel(name = "商家名称", orderNum = "2", width = 20)
    private String sale;

    /** 销售名称和编号 **/
    @Excel(name = "所属销售", orderNum = "11", width = 20)
    private String saleRoot;

    /** 提现账户 **/
    @Excel(name = "提现账户", orderNum = "5", width = 30)
    private String withdrawalAccount;

    /** 到账状态 **/
    @Excel(name = "到账状态", orderNum = "6", width = 20)
    private String completeStatus;

    /** 提现状态 **/
    @Excel(name = "提现状态", orderNum = "7", width = 20)
    private String withdrawalStatus;

    public String getSale() {
        return getSaleName() + "(" + getSaleNum() + ")";
    }

    public String getSaleRoot() {
        return getSaleRootName() + "(" + getSaleRootNum() + ")";
    }

    public String getWithdrawalAccount() {
        return SaleWithdrawalConst.AccountTypeCode.getNameByCode(getAccountTypeCode()) + "：" + getAccount() + "，" + getAccountName();
    }

    public String getCompleteStatus() {
        return SaleWithdrawalConst.CompleteFlag.getNameByCode(getCompleteFlag());
    }

    public String getWithdrawalStatus() {
        return SaleWithdrawalConst.StatusCode.getNameByCode(getStatusCode());
    }
}
